package com.googlecode.tidej.shared.model;

public class Property extends Artifact {
  Type type;
  String initialValue;
  Type owner;
  boolean constant;
  
  public Property(String name, Type type, boolean constant, String initialValue) {
    super(name);
    this.type = type;
    this.initialValue = initialValue;
    this.constant = constant;
  }

  public Type getType() {
    return type;
  }

  public String getInitialValue() {
    return initialValue;
  }

  public Type getOwner() {
    return owner;
  }

  @Override
  public Library getLibrary() {
    return owner.getLibrary();
  }
  
  
  @Override
  public String getTitle() {
    return type.getLink() + " <b>" + name + "</b>";
  }

  
  public String getQualifiedName() {
    return owner.getQualifiedName() + "." + name;
  }

  public void setType(Type type) {
    this.type = type;
  }

  public void setInitialValue(String newInitialValue) {
    this.initialValue = newInitialValue;
  }

}
